/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: #c81623;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
}

.search-box {
    display: flex;
    width: 50%;
    max-width: 600px;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.search-btn {
    padding: 10px 20px;
    background-color: #ff0036;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background-color: #e60033;
}

.user-nav {
    display: flex;
    gap: 20px;
}

.user-nav a {
    padding: 5px 10px;
    transition: opacity 0.3s;
}

.user-nav a:hover {
    opacity: 0.8;
}

/* 轮播图样式 */
.slider-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    margin-bottom: 30px;
}

.slider {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform 0.5s ease;
}

.slide {
    flex: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slider-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background-color: white;
}

/* 商品分类 */
.categories {
    padding: 30px 5%;
    background-color: white;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.categories h2 {
    margin-bottom: 20px;
    font-size: 22px;
    color: #333;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.category-item {
    padding: 25px 0;
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
}

.category-item:hover {
    background-color: #ff0036;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(255, 0, 54, 0.2);
}

/* 商品列表 */
.product-list {
    padding: 0 5% 40px;
}

.product-list h2 {
    margin-bottom: 20px;
    font-size: 22px;
    color: #333;
}

.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.product-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-bottom: 1px solid #f0f0f0;
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 15px;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

.product-price {
    color: #ff0036;
    font-size: 18px;
    font-weight: bold;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    margin-left: 8px;
}

.add-to-cart {
    display: block;
    width: 100%;
    padding: 10px 0;
    margin-top: 15px;
    background-color: #ff0036;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.add-to-cart:hover {
    background-color: #e60033;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background-color: #4CAF50;
    color: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-30px);
    transition: all 0.3s;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.fade-out {
    opacity: 0;
    transform: translateY(-30px);
}